package cn.wolfode.wolf2w.cloud.commom.exception;

import cn.wolfode.wolf2w.cloud.commom.util.JsonResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
//统一的父亲
public class CommExceptionAdvice {
    @ExceptionHandler(BusinessException.class)
    @ResponseBody
    public JsonResult handler(BusinessException e){
        e.printStackTrace();
        return new JsonResult(e.getCodeMsg(), null);
    }
}
